Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(label): hide labelLine on emphasis when emphasis.labelLine.show is false. close #19160 #19165

Closed
wants to merge 1 commit into from

Conversation

ChepteaCatalin
Copy link
Contributor

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Enables hiding of labelLine on emphasis when emphasis.labelLine.show is false.

Fixed issues

Details

Before: What was the problem?

In pie and line charts, when emphasis.labelLine.show was set to false, the labelLine didn't disappear on emphasis. This was because the emphasis state didn't exist for labelLine. A similar issue (#16539) was fixed, but the labelLine could be hidden only if emphasis.labelLine.show was set to true and then reset to false. If this option was initially set to false, it didn't work.

After: How does it behave after the fixing?

Now, the emphasis state is ensured for labelLine, which means that labelLine can now be hidden on emphasis if emphasis.labelLine.show is set to false.

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

@echarts-bot
Copy link

echarts-bot bot commented Sep 28, 2023

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right. ensureState('emphasis') is usually used when you want to set the style of the emphasis state. But in this implementation, the logic is not for emphasis only. Please search the usage of ensureState and try how this should be done. I'm also not sure about this, but this may seem helpful.

Please also add the test case when labelLine.show is set to be false in normal and true in emphasis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants